﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using InfoExpress.HIV.WinApp.DataSets.PrintPreviews;
using InfoExpress.HIV.Domains;

namespace InfoExpress.HIV.WinApp.Utils
{
  public static class ReportUtils
  {
    public static DataTable ConvertDsCapTheListToDataTable(TList<BenhNhanDangKy> dsCapTheList)
    {
      DataTable dtbDsCapThe = new DtsDsCapThe.DtbDsCapTheDataTable();
      TList<BenhNhanDangKy>.ForEach<BenhNhanDangKy>(dsCapTheList, 
        o => dtbDsCapThe.Rows.Add(
          o.MaBenhNhan, 
          o.TenBenhNhan, 
          o.NgayDangKy, 
          o.NgayTao, 
          o.UserTao));
      
      return dtbDsCapThe;
    }
  }
}
